fpsoverlay: Fix fps overlay position
authorTimm Bäder <mail@baedert.org>
Wed, 10 Jul 2019 06:26:00 +0000 (08:26 +0200)
committerTimm Bäder <mail@baedert.org>
Wed, 10 Jul 2019 16:34:16 +0000 (18:34 +0200)
gtk/inspector/fpsoverlay.c

index dadf1ffe145a0aeb3e247ffafb57838f93a2ce43..a659c1dcdda1d43dbc72d62780fb46a658ea7989 100644 (file)
@@ -159,7 +159,7 @@ gtk_fps_overlay_snapshot (GtkInspectorOverlay *overlay,
   double fps;
   char *fps_string;
   graphene_rect_t bounds;
-  gboolean has_bounds = FALSE;
+  gboolean has_bounds;
   int width, height;
   double overlay_opacity;
 
@@ -207,6 +207,8 @@ gtk_fps_overlay_snapshot (GtkInspectorOverlay *overlay,
       if (!child ||
           !gtk_widget_compute_bounds (child, widget, &bounds))
         has_bounds = gtk_widget_compute_bounds (widget, widget, &bounds);
+      else
+        has_bounds = gtk_widget_compute_bounds (child, widget, &bounds);
     }
   else
     {